package cn.script.app;

import cn.script.app.bean.LogInfo;
import cn.script.app.bean.LogOutApi;
import cn.script.fxj.FXBaseController;
import cn.script.util.LogOut;
import javafx.fxml.FXML;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;

import javax.annotation.PostConstruct;

public class LogAction extends FXBaseController {

    @FXML
    TableView logTable;

    @FXML
    TableColumn<LogInfo, String> logs;

    LogOutApi logOut = new LogOutApi();

    @PostConstruct
    @Override
    public void initLoad() throws Exception {
        super.initLoad();
        this.logs.setCellValueFactory(cellData -> cellData.getValue().valProperty());
        this.logTable.setItems(this.logOut.getLogs());
        LogOut.setOutLogApi(this.logOut.getOutLogApi());
    }
}
